#include "bitmap.hpp"
#include <time.h>
#include <stdlib.h>
#include <bitset>
using namespace ns_bitmap;

void Test1()
{
    bit_map<100> b1;
    b1.set(10);
    b1.set(55);
    b1.set(18);
    b1.set(26);
    b1.set(31);
    std::cout << b1.test(11) << std::endl;
    std::cout << b1.test(26) << std::endl;
    std::cout << b1.test(31) << std::endl;
    std::cout << b1.test(25) << std::endl;
    std::cout << b1.test(55) << std::endl;
    std::cout << b1.test(5) << std::endl;
}

void Test2()
{
    bit_map<0xffffffff> b;
    //std::bitset<-1> b;
    srand(time(0));
    for(int i = 0;i < 100;++i)
    {
        int tmp = rand() % 1000;
        b.set(tmp);
        std::cout << "tmp = " << tmp << " : " << b.test(tmp) << std::endl;
    }
}

void Test3()
{
    two_bitMap<100> tb;
    int a[] = {1, 10, 15, 12, 10, 12, 15, 8, 1};
    for(auto e : a)
    {
        tb.set(e);
    }
    tb.PrintNum();
}

int main()
{
    //Test1();
    //Test2();
    Test3();

    return 0;
}